package portal.action.views;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class ViewAction {
	

	@RequestMapping(value="/views/task/list",method=RequestMethod.GET)
	public String taskList(){
		//req.setAttribute("modelId", modelId);
		return "task/taskList";
	}
	@RequestMapping(value="/views/task/hislist",method=RequestMethod.GET)
	public String taskHisList(){
		//req.setAttribute("modelId", modelId);
		return "task/taskHisList";
	}

	@RequestMapping(value="/views/task/create",method=RequestMethod.GET)
	public String taskCreate(String taskNum ,String modelId,HttpServletRequest req){
		req.setAttribute("taskNum", taskNum);
		req.setAttribute("modelId", modelId);
		return "task/taskCreate";
	}
	@RequestMapping(value="/views/task/create/save",method=RequestMethod.GET)
	public String taskCreateSave(){
		return "task/taskCreateSave";
	}
	@RequestMapping(value="/views/task/create/alert",method=RequestMethod.GET)
	public String taskCreateAlert(){
		return "task/taskCreateAlert";
	}
	@RequestMapping(value="/views/task/detail",method=RequestMethod.GET)
	public String taskDetail(){
		return "task/taskDetail";
	}
	@RequestMapping(value={"/views/task/run"},method=RequestMethod.GET)
	public String taskRun(String taskId ,HttpServletRequest req){
		req.setAttribute("taskId", taskId);
		return "task/taskCreate";
	}
	@RequestMapping(value={"/views/task/status"},method=RequestMethod.GET)
	public String taskStatus(String taskHash ,HttpServletRequest req){
		req.setAttribute("taskHash", taskHash);
		return "task/taskCreate";
	}
	@RequestMapping(value={"/views/task/set/start"},method=RequestMethod.GET)
	public String taskSetStart(){
		//req.setAttribute("taskHash", taskHash);
		return "task/taskStart";
	}
	@RequestMapping(value={"/views/task/set/algorithm"},method=RequestMethod.GET)
	public String taskAlgorithm(){
		//req.setAttribute("taskHash", taskHash);
		return "task/taskAlgorithm";
	}
	@RequestMapping(value={"/views/task/set/output"},method=RequestMethod.GET)
	public String taskSetOutput(){
		//req.setAttribute("taskHash", taskHash);
		return "task/taskOutput";
	}
	@RequestMapping(value={"/views/task/set/output/docSelect"},method=RequestMethod.GET)
	public String tasOutputDocSelect(){
		//req.setAttribute("taskHash", taskHash);
		return "task/tasOutputDocSelect";
	}

	@RequestMapping(value={"/views/task/chooseModel"},method=RequestMethod.GET)
	public String taskChooseModel(){
		//req.setAttribute("taskHash", taskHash);
		return "task/taskChooseModel";
	}	
}
